replace Text
Inserts the given text into the selected range of the text block. Required scope: "text/edit"
Parameters
block
the text block into which to insert the given text.
text
the text which should replace the selected range in the block.
from
the start index of the range that should be replaced. If the value is negative, this will fall back to the start of the entire text range.
to
the index after the last character that should be replaced by the inserted text. If the value is negative, this will fall back to the end of the entire text range.